<?php
use Yjius\common\Debug;

require __DIR__ . "/../../vendor/autoload.php";

try {
    //例子 -已通
    $config = require dirname(__DIR__) . "/config/open-api/weibo.php";
    $ser = new \Yjius\openapi\weibo\WeiBoOauth($config);
    $res = $ser->getCodeUrl();//回调地址必须是微博方设置的管家的地址，
    $res2 = $ser->getToken("0454859c4901d9ba59a3f250a6e41d89");
    $res3 = $ser->getUserShowByUid($res2['access_token'] = '2.009MTbFDmYyWpB2363ac0c1akEE3cE',
        $res2['uid'] = "2831210560");
    Debug::print_r($res, $res2, $res3);
    exit;
} catch (Exception $exception) {
    echo $exception->getMessage();
    exit;
}